1. Field of the Invention
The present invention relates to a numerical control device, and more particularly, to a numerical control device which acquires alarm information from an IO unit connected to the numerical control device.
2. Description of the Related Art
There is a configuration where a plurality of external signal input/output units are connected in order to perform input/output of a DI/DO signal (input signal/output signal) between a numerical control device and a machine tool. Hereinafter, the external signal input/output units are referred to as “IO units”. In general, DI/DO data are exchanged between a numerical control device body and the IO unit in the numerical control device. In addition, communication is performed at the same time of exchanging the DI/DO data, and a state of each IO unit such as alarm information is used to examine the cause of occurrence of alarm.
With respect to the communication of the state of the IO unit, JP-A 2009-53734 discloses a method of notifying alarm information of power supply disconnection occurring in IO units connected in a daisy chain to the IO units at the foregoing stages, and a numerical control device which distinguishes communication line disconnection and power supply disconnection of the IO unit and notifies the distinguished communication line disconnection and power supply disconnection to the numerical control device.
FIG. 11 illustrates a configuration of the numerical control device mentioned above. In a numerical control device 1, an IO unit 1 (20a), an IO unit 2 (20b), an IO unit 3 (20c), and an IO unit 4 (20d) are connected to a numerical control device body 10 so that the IO units are connected in a daisy chain. Communication data 40 are transmitted to each IO unit, and as illustrated in FIG. 11, a structure of the communication data 40 is configured to include HEADs, DATA, ALM, and CRC. In addition, feed shaft amplifiers 32 (32a, 32b) are connected to the numerical control device body 10. Each feed shaft amplifier 32 includes a communication control circuit 34 therein. In addition, a feed shaft motor 36 is connected to each feed shaft amplifier 32.
Herein, in a configuration where a master and a plurality of slaves are connected, in general, a DI/DO signal is exchanged periodically between the master and the slaves. When a particular event such as communication abnormality occurs, the master performs read/write of a register inside the slave through command communication which issues a command to the slave. In the command communication, the master and the slave perform one-to-one communication, and the master checks a result of command execution based on a reply from the slave. In this manner, through the command communication, the master can perform initial setting after the power is supplied until the communication abnormality occurs, operation control and collection of information when the abnormality occurs.
In the example illustrated in FIG. 11, the numerical control device body 10 corresponds to the master, and each IO unit 20 (20a, 20b, 20c, and 20d) corresponds to the slave. In the communication between the numerical control device body 10 and each IO unit 20, when the numerical control device body 10 detects the communication abnormality, the alarm information is exchanged between the IO units. Finally, through the command communication, the numerical control device body 10 acquires the alarm information from the IO unit 1 (20a) directly connected to the numerical control device body 10. The numerical control device body 10 specifies a true factor causing the communication abnormality, that is, specifies which abnormality among power supply disconnection, communication line disconnection and the like occurs in an IO unit 20 based on the alarm information acquired from the IO unit 1 (20a), so that it is possible to perform countermeasures such as stopping an amplifier or a motor according to a content of the abnormality.
The numerical control device disclosed in JP-A 2009-53734 needs to acquire the alarm information one by one in the order from the IO unit near to the numerical control device in order to detect the alarm information such as power supply disconnection occurring in the IO units connected in a daisy chain. Therefore, a considerable time may be taken to specify the true factor causing the communication abnormality.
Herein, in the IO units connected in a daisy chain, in a case where the abnormality caused by the power supply disconnection or the communication line disconnection occurs, it may be necessary to immediately stop the operation of the numerical control device, since normal operations are not guaranteed in the IO units at the following stages of the site where the abnormality occurs. However, in some cases, in order to immediately stop the operation of the numerical control device, it may not be possible to secure a sufficient time for the numerical control device body to acquire the alarm information from the IO unit where the communication abnormality occurs.